#ifndef __ONE_LED_BLOCK_H__
#define __ONE_LED_BLOCK_H__

#include "MountedElectricElementBlock.hpp"

namespace PocketSurvival
{
    // 1面LED灯
    class OneLedBlock : public MountedElectricElementBlock
    {
    public:
        static constexpr int32_t Index()
        {
            return 253;
        }
        virtual int32_t getIndex() override; 
        virtual const std::string &getBlockName() override;
        virtual int32_t getFace(int32_t value) override;

        virtual const std::vector<BoundingBox> &getCustomCollisionBoxes(int32_t value) override;

        static inline int32_t GetMountingFace(int32_t data);
        static inline int32_t SetMountingFace(int32_t data, int32_t face);
    };

    inline int32_t OneLedBlock::GetMountingFace(int32_t data)
    {
        return data & 7;
    }

    inline int32_t OneLedBlock::SetMountingFace(int32_t data, int32_t face)
    {
        return (data & -8) | (face & 7);
    }

} // namespace PocketSurvival

#endif
